package com.landleaf.smarthome.net.http;

import com.landleaf.smarthome.model.FamilyModel;
import com.landleaf.smarthome.model.FloorModel;
import com.landleaf.smarthome.model.NewsModel;
import com.landleaf.smarthome.model.SceneModel;
import com.landleaf.smarthome.model.TimingModel;
import com.landleaf.smarthome.model.VersionModel;
import com.landleaf.smarthome.model.WeatherModel;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.POST;

/**
 * When I wrote this, only God and I understood what I was doing
 * Now, God only knows
 * Created by 海航
 * 2020/9/1
 * 功能描述:
 */
public interface NetApi {
    /**
     * 获取房间设备信息
     *
     * @param
     * @return
     */
    @POST("floor-room-device/list")
    Observable<NetResponse<List<FloorModel>>> getFloorDeviceList();

    /**
     * 定时场景信息请求
     *
     * @param
     * @return
     */
    @POST("timing/scene/list")
    Observable<NetResponse<List<TimingModel>>> getTimingSceneList();

    /**
     * 定时场景配置 修改/新增
     *
     * @param
     * @return
     */
    @POST("timing/scene/save-update")
    Observable<NetResponse<List<TimingModel>>> updateTimingSceneList(NetRequest<List<TimingModel>> request);

    /**
     * 定时场景配置 删除
     *
     * @param
     * @return
     */
    @POST("timing/scene/delete")
    Observable<NetResponse<List<TimingModel>>> deleteTimingSceneList(NetRequest<List<String>> request);

    /**
     * 天气
     *
     * @param
     * @return
     */
    @POST("news/list")
    Observable<NetResponse<List<NewsModel>>> getNewsList();

    /**
     * 天气
     *
     * @param
     * @return
     */
    @POST("weather")
    Observable<NetResponse<WeatherModel>> getWeather();
    /**
     * apk更新
     *
     * @param
     * @return
     */
    @POST("apk-version/check")
    Observable<NetResponse<VersionModel>> apkUpdate(NetRequest<String> request);

    /**
     * 获取家庭码
     *
     * @param
     * @return
     */
    @POST("familyCode")
    Observable<NetResponse<FamilyModel>> apkFamilyCode();

    /**
     * 是否是节假日
     * requset 需要  "yyyy-mm-dd" 的格式
     * @param
     * @return
     */
    @POST("holidays/check")
    Observable<NetResponse<FamilyModel>> checkHoliday(NetRequest<String> request);

    /**
     * 获取当前场景列表
     * requset 需要  "yyyy-mm-dd" 的格式
     *
     * @param
     * @return
     */
    @POST("scene/list")
    Observable<NetResponse<List<SceneModel>>> getSceneList();
}
